# 判断一个整数是不是回文数
# 回文数: 左右对称, 如: 12321
# https://www.zhihu.com/question/51033691


def reverse(num):
    '''
    :param: int
    :return: str
    '''
    nstr=str(num)
    a=''
    for i in nstr:
        a=i+a
    return a

print(reverse(12345))


def hui_wen(num):
    num_str = str(num)
    # if num_str==num_str[::-1]:
    if reverse(num)==num_str:
        return True
    return False

print(hui_wen('abcdedcba'))